/*
 * @Author: 橘子
 * @Date: 2023-03-13 16:55
 * @Project_description: 组织模块
 * @Description: 代码是我抄的，不会也是真的
 */

'use strict'
export default {
  namespaced: true,
  state: {
    // 当前点击访问的orgId
    orgId: '',
    orgTree: [],
  },
  actions: {
    /**
     * @description 设置组织id
     * @param {Object} context
     * @param {*} info info
     */
    set({ state, dispatch }, orgId) {
      // store 赋值
      state.orgId = orgId
    },
    setOrgTree({ state, dispatch }, orgTree) {
      // store 赋值
      state.orgTree = orgTree
    },
    /**
     * @description 获取组织id
     * @param {Object} context
     */
    get({ state, dispatch }) {
      // store 赋值
      return state.orgId
    },
    getOrgTree({ state, dispatch }) {
      // store 赋值
      return state.orgTree
    },
  },
}
